package com.my.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.support.SpringFactoriesLoader;

import java.util.List;

/**
 * @author zhaodongchao
 * @date 2020/4/2 19:23
 **/
public class Demo {
    public static void main(String[] args) {
        List<String> strings = SpringFactoriesLoader.loadFactoryNames(ApplicationListener.class, Demo.class.getClassLoader());
        System.out.println(strings);
        SpringApplication springApplication = new SpringApplication(BcloudAuthServerApplication.class);
        ResolvableType type = ResolvableType.forInstance(new ApplicationEnvironmentPreparedEvent(springApplication, new String[]{}, null));
        System.out.println(type);
    }
}
